<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增报名 ')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-register-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">小项：</label>
                <div class="col-sm-8">
                    <select name="itemId" class="form-control">
                        <option th:each="item : ${itemList}" th:text="${item.name}" th:value="${item.id}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">选手：</label>
                <div class="col-sm-8">
                    <select name="playerIds" class="form-control" multiple>
                        <option th:each="player : ${playerList}" th:text="${player.name + '(' + player.idcard + ')'}" th:value="${player.id}"></option>
                    </select>
                </div>
            </div>
            <!--<div class="form-group">-->
                <!--<label class="col-sm-3 control-label">替补：</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<select name="replacePlayerIds" class="form-control" multiple>-->
                        <!--<option th:each="player : ${playerList}" th:text="${player.name + '(' + player.idcard + ')'}" th:value="${player.id}"></option>-->
                    <!--</select>-->
                <!--</div>-->
            <!--</div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">作品名称：</label>
                <div class="col-sm-8">
                    <input name="worksName" class="form-control" type="text"  autocomplete="off">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "js/register";
        $("#form-register-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-register-add').serialize());
            }
        }
    </script>
</body>
</html>